<template>
  <div class="main">
    <InputSearch
      class="right"
      v-model:value="name"
      placeholder="请输入组织名称"
      enter-button
      @search="onSearch"
      style="width: 240px"
    ></InputSearch>
  </div>
</template>

<script lang="ts" setup>
import { InputSearch } from 'ant-design-vue';
import { ref } from 'vue';

const emit = defineEmits(['query']);
const name = ref<string>('');
function onSearch() {
  emit('query', { name: name.value });
}
</script>

<style lang="less" scoped>
.main {
  white-space: nowrap;
}
.left {
  width: 70px;
  display: inline-block;
  margin-top: 4px;
}
.right {
  width: 500px;
  display: inline-block;
}
</style>
